package com.xyf.testJPA.service;

import java.util.List;
import java.util.Map;

import com.xyf.testJPA.bean.Teacher;

public interface ITeacherService {

	public void saveTeacherBean(Teacher teacher);
	/**
	 * 自带批量添加,但是底层是hibernate,所以还是一条一条执行的,并没有提高性能
	 * @param list
	 */
	public void saveBatch(List<Teacher> list);
	
	public void delTeacherBean(Teacher bean);
	
	public void delBatch(List<Teacher> list);
	
	public void delAll();
	
	/**
	 * 更新整个对象
	 * @param bean
	 */
	public void updateTeacher(Teacher bean);
	/**
	 * 更新部分条件
	 * @param sex
	 * @param id
	 */
	public void updateTeacherSex(boolean sex,Integer id);
	
	public Teacher findByID(Integer id);
	/**
	 * 根据条件查询出一个
	 * @param name
	 * @return
	 */
	public Teacher findOneByTeacherName(Teacher teacher);
	
	public List<Teacher> findAll();
	
	public List<Teacher> findByIteam(Map iteam);
	
	public int findCountByIteam(Map iteam);
	
	
}
